
<% if @message.present? %>
  <%= Markdown.new(@message).to_html.html_safe %>
<% else %>
  <p><%= t("devise.mailer.invitation_instructions.hello") %></p>

  <p><%= t("devise.mailer.invitation_instructions.someone_invited_you", community_name: Settings::Community.community_name, url: root_url) %></p>

  <p><%= t("devise.mailer.invitation_instructions.accept_instructions") %>:</p>

<% end %>

<p><%= link_to t("devise.mailer.invitation_instructions.accept"),
               accept_invitation_url(@resource, invitation_token: @token),
               style: "color:white; background: #{Settings::UserExperience.primary_brand_color_hex}; border-radius: 8px; padding: 10px 20px; font-size: 1.33em; display: inline-block; margin: 8px 0; text-decoration: none; font-weight: bold;" %></p>

<% if @resource.invitation_due_at %>
  <p><%= t("devise.mailer.invitation_instructions.accept_until", due_date: l(@resource.invitation_due_at, format: :"devise.mailer.invitation_instructions.accept_until_format")) %></p>
<% end %>

<div class="style: font-size: 0.9em">
  <% if @footnote.present? %>
    <%= Markdown.new(@footnote).to_html.html_safe %>
  <% end %>

  <p><%= t("devise.mailer.invitation_instructions.ignore") %></p>
</div>
